package com.woniuxy.carrental.mapper;

import com.woniuxy.carrental.entity.Wareing;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author author
 * @create 2021-10-08 9:44
 * 肖某的记录入库表单
 */
public interface WareingMapper {

    //新增
void addWareing(Wareing wareing);

    //分页查询仓库入库表中所有数据
    public List<Wareing> selectWareingByPage(@Param("wareing")Wareing wareing, @Param("pageIndex") int pageIndex,
                                           @Param("pageSize") int pageSize);
    //分页查询数据条数
    public int selectCountWareingByPage(@Param("wareing")Wareing wareing);

    //    //查询总条数据
    public int selectCountWareing();

    //根据id删除表中数据
    @Delete("delete from wareing where wareingid=#{wareingid}")
    void deleteWareingMapper(String wareingid);

    //查询表中数据根据deta排序
    @Select("select * from wareing order by wareingdata desc")
    List<Wareing> selectAll();
}
